<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Auth::routes();
Route::group(['prefix' => '/', 'namespace' => "Company"], function () {
    //公司首页
    Route::any('/company', 'HomeController@index');
    Route::any('/company/pay', 'HomeController@pay');
    //职位管理
    Route::any('/company/job', 'JobController@index')->name('job_list');
    Route::any('/company/job/{id}', 'JobController@index');
    Route::any('/job/edit', 'JobController@edit');
    Route::any('/job/edit/{id}', 'JobController@edit');
    Route::any('/job/delete/{id}', 'JobController@delete');
    Route::any('/job/regain/{id}', 'JobController@regain');


    //简历管理
    Route::any('/company/resume', 'ResumeController@index');
    Route::any('/company/resume/{id}', 'ResumeController@index');
    Route::any('/resume/interview', 'ResumeController@interview');
    Route::any('/resume/refresh', 'ResumeController@refresh');
    Route::any('/interview/delete/{id}', 'ResumeController@interview_delete');

    Route::any('/resume/favorites', 'ResumeController@favorites');
    Route::any('/resume/log', 'ResumeController@log');
    Route::any('/resume/status', 'ResumeController@status');
    //账号管理
    Route::any('/company/info', 'InfoController@index');
    Route::any('/info/edit', 'InfoController@index');
    Route::any('/info/security', 'InfoController@security');
    Route::any('/ajax/groom', 'HomeController@groom');

});
Route::group(['prefix' => 'auth', 'namespace' => "Auth"], function () {
    //ajax 注册

    Route::any('/ajax_register', 'RegisterController@ajax');
    Route::any('/check', 'RegisterController@check');
    Route::any('/add', 'RegisterController@add');
    Route::any('/sms', 'RegisterController@sms');
    Route::any('/login', 'LoginController@showLoginForm')->name('login');
    Route::any('/reset', 'RegisterController@resetPassword');
});
Route::group(['prefix' => '/', 'namespace' => "Home"], function () {
    Route::get('/', 'IndexController@index');
    Route::get('job', 'JobController@index');
    Route::any('job/info/{id}', 'JobController@info');
    Route::any('/job/apply', 'JobController@apply');
    Route::get('resume', 'ResumeController@index');
    Route::get('resume/info/{id}', 'ResumeController@info');
    Route::any('/resume/doc/{id}', 'ResumeController@doc');
    Route::get('/resume/collect', 'ResumeController@collect');
    Route::get('/resume/apply/{id}', 'ResumeController@apply');
    Route::any('/validate/company', 'IndexController@isCompany');
});
Route::group(['prefix' => '/', 'namespace' => "App"], function () {
    Route::any('/gather/index', 'GatherController@index');
    Route::post('/gather/index/{id}', 'GatherController@index');
});
Route::group(['prefix' => '/member', 'namespace' => "Member"], function () {
    Route::any('/', 'HomeController@index');
    Route::any('/ajax_save_basic_info', 'HomeController@ajax_save_basic_info');
    Route::any('/ajax_save_intention', 'HomeController@ajax_save_intention');
    Route::any('/ajax_save_specialty', 'HomeController@ajax_save_specialty');
    Route::any('/apply', 'JobController@apply');
    Route::any('/interview', 'JobController@interview');
    Route::any('/favorite', 'JobController@favorite');
    Route::any('/info', 'InfoController@store');
    Route::any('/info', 'InfoController@store');
    Route::any('/interview/info', 'InterviewController@info');
    Route::any('/interview/del/{id}', 'InterviewController@del');
});
